//
//  EMLoanHeaderView.m
//  EasyMoney
//
//  Created by zh on 2020/1/11.
//  Copyright © 2020 zh. All rights reserved.
//

#import "EMLoanHeaderView.h"

@interface EMLoanHeaderView ()
@property (nonatomic, strong) UIImageView *bgImageView; //背景图
@property (nonatomic, strong) UILabel *titleLabel; //title


@end

@implementation EMLoanHeaderView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self setupUI];
    }
    return self;
}
- (void)setupUI{

    UIImage *bgImage = [UIImage imageNamed:@"homeicon_5"];
    self.bgImageView = [[UIImageView alloc]initWithImage:bgImage];
    [self addSubview:self.bgImageView];
    [self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.top.equalTo(self);
        make.height.equalTo(self);
    }];
    self.titleLabel = [[UILabel alloc]init];
    self.titleLabel.font = FONT_PINGFANG_MEDIUM_(18);
    self.titleLabel.text = NSLocalizedString(@"PinMoney", nil);
    self.titleLabel.textColor = ColorFromRGB(0xffffff);
    [self addSubview:self.titleLabel];
    [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(EMStatusBarHeight);
        make.centerX.equalTo(self);
    }];

}

@end
